#include <iostream>
#include <vector>
#include <functional>
#include <string>

void print(std::string str, int num){
    std::cout << str << " " << num << std::endl;
}

int main(){
    using Task = std::function<void()>;
    std::vector<Task> tasks;
    tasks.push_back(std::bind(print, "hello1", 1));
    tasks.push_back(std::bind(print, "hello2", 2));
    tasks.push_back(std::bind(print, "hello3", 3));
    tasks.push_back(std::bind(print, "hello4", 4));

    auto task = std::bind(print, "hello5", std::placeholders::_1);
    task(5);

    for(auto& func: tasks){
        func();
    }
    return 0;
}